<!DOCTYPE html>
<!-- 
Template Name: Metronic - Responsive Admin Dashboard Template build with Twitter Bootstrap 3.1.1
Version: 2.0.2
Author: KeenThemes
Website: http://www.keenthemes.com/
Contact: support@keenthemes.com
Purchase: http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469?ref=keenthemes
License: You must have a valid license purchased only from themeforest(the above link) in order to legally use the theme for your project.
-->
<!--[if IE 8]>
<html lang="en" class="ie8 no-js">
	<![endif]-->
	<!--[if IE 9]>
	<html lang="en" class="ie9 no-js">
		<![endif]-->
		<!--[if !IE]>
		<!-->
		<!--<![endif]-->
		<!-- BEGIN HEAD -->
		<link rel="stylesheet" href="./assets/css/site.css"/>
		<style type="text/css">
		.page-content .wraping{ background: #fff; padding: 10px; }
		.site_content div{
			list-style: none;
			margin: 0;
			padding: 0;
			font-family: Microsoft Yahei;
			display: block;
		}
		.site_content .tab_box {
			font-size: 16px;
			height: 70px;
			line-height: 70px;
			/*padding-left: 25px;*/
			background-color: #fff;
		}
		.site_content {
			height: auto;
			border-top: 0;
		}
		.tab_box .tab_tit.active, .tab_box .tab_tit.active:hover {
			color: #009fcd;
			border-bottom: 2px solid #009fcd;
			cursor: inherit;
		}
		.tab_box .tab_tit {
			display: inline-block;
			padding: 0 40px;
			cursor: pointer;
		}
		.site_content .add_export {
			float: right;
			width: 250px;
			height: 20px;
			margin-top: 10px;
		}
		.site_content .add_export #export {
			background: #019fce;
		}
		.site_content .add_export input {
			line-height: 20px;
			border: 1px;
			font-size: 15px;
			color: #FFFFFF;
			border-radius: 4px;
			background: #f3f3f3;
			float: right;
			margin-right: 15px;
			padding: 5px;
			cursor: pointer;
		}
		.site_content .add_export #add_site {
			background: #88888a;
		}
		.lightDiv{
			border: solid 3px rgba(1, 160, 207, 0);

		}
	#operate1 input[type="button"]{
		background-color: #01a0cf;
		position: absolute;top: 50px;right: 115px;width: 78px;height: 31px;
	}
	#operate1 input[type="button"]:hover{
		background-color: #f3f3f3;
		color:#000;
	}
	.foot{
		background: #fff;

	}
	.foot p{
		font-size: 13px;
	}
	/*--2016-11-16新增--*/
	.form-tab{ margin-right: 20px; }
	.fr{ float: right; }
	.form-control{ display: inline-block; width: 140px; }
	.all_delete{ width: 100px; height: 31px; background: #01a0cf; color: #fff; border:0; }
	.site_content div.mt20,.ul_one li div.mt20,.mt20{ margin-top:20px; }
	.ul_one li{ overflow: hidden; margin-top: 20px; }
	#addPushMessage .ul_one li span,.ul_one li b{ display: inline-block; width: 17%; text-align: right; }
	#addPushMessage .form-control,.ul_one li span.span_detail{ display: inline-block; width: 80%; vertical-align:middle; }
	#addPushMessage .form-control.width47{ width: 38.5%; }
	textarea{ resize: none; }
	#addPushMessage .w5c-error{ margin-left:17%; }
	</style>
		<!-- BEGIN BODY -->
<body class="page-header-fixed">
		<div class="site_content" id="tab_div">
			<!--<div class="tab_box">
			-->
			<div class="content_box">
				<div class="tabbable tabbable-custom tabbable-full-width">
					<div class="tab-content">
						<div class="tab-pane active" id="tab_1_1">
							<div class="realtime_content tab_div">
								<!--添加推送-->
								<div>
									<input type="button" value="新增消息推送" class="all_delete"  
										ng-click="addPushMessage();" />
								</div>
								<!--筛选条件-->
								<!--<div class="mt20">
									<span class="form-tab">消息状态:
										<select ng-model="messageStatus" class="form-control">
											<option ng-selected="true" value="">所有消息状态</option>
											<option value="1">及时推送</option>
											<option value="3">延时推送</option>
											<option value="2">草稿</option>
										</select>
									</span>
									<span class="form-tab">消息类型:
										<select ng-model="messageType" class="form-control">
											<option ng-selected="true" value="">所有消息类型</option>
											<option value="1">普通消息推送</option>
											<option value="2">系统更新推送</option>
											<option value="3">活动推送</option>
										</select>
									</span>
									<span class="form-tab">推送系统端:
										<select ng-model="sysCode" class="form-control">
											<option ng-selected="true" value="1">所有端</option>
											<option value="2">app端</option>
											<option value="3">微信端</option>
										</select>
									</span>
									<span class="form-tab">用户范围:
										<select ng-model="merchantCode" class="form-control">
											<option ng-selected="true" value="2">所有运营商</option>
											<option value="1">电桩用户</option>
											<option value="3">华体用户</option>
										</select>
									</span>
								</div>
								<search-data></search-data>-->
								<table class="table table-striped table-bordered table-hover" id="table_1" style="margin-top: 15px;">
									<thead>
										<tr>
											<th>标题</th>
											<th>内容</th>
											<th>创建时间</th>
											<th>推送消息范围</th>
											<th>推送用户范围</th>
											<th>推送系统端</th>
											<th>推送消息类型</th>
											<th>消息状态</th>
											<th>推送时间</th>
											<th>推送操作员</th>
											<th>操作</th>
										</tr>
									</thead>
									<tbody>
										<!--<tr>
											<td>国庆活动</td>
											<td>充电打7折活动，大家捡乡音了……</td>
											<td>2016-09-29 13:55:23</td>
											<td>所有注册用户</td>
											<td>电桩用户</td>
											<td>所有用户端</td>
											<td>活动推送</td>
											<td>延时推送</td>
											<td>2016-09-30 00:00:00</td>
											<td>胡晓天</td>
											<td><a class="btn" data-target="#" href="index.html#/pushDetail/001">查看</a> <a class="btn" data-target="#" href="index.html#/pushDetail/{{pushList.pushId}}">推送</a></td>
										</tr>-->
										<tr ng-repeat="pushList in pushList" pg-loaded="{{$last}}" target-table="table_1">
											<td>
												<span ng-bind="pushList.title"></span>
											</td>
											<td>
												<span ng-bind="pushList.content"></span>
											</td>
											<td>
												<span ng-bind="pushList.editDate"></span>
											</td>
											<td>
												<span>
													{{pushList.scope | getValueInStaticFilter : 'scopeStatusArray' }}
												</span>
											</td>
											<td>
												<span>
													{{pushList.pushOperator | getValueInStaticFilter : 'merchantCodeArray' }}
												</span>
											</td>
											<td>
												<span>
													{{pushList.sysCode | getValueInStaticFilter : 'sysCodeStatusArray' }}
												</span>
											</td>
											<td>
												<span>
													{{pushList.messageType | getValueInStaticFilter : 'messageTypeArray' }}
												</span>
											</td>
											<td>
												<span>
													{{pushList.state | getValueInStaticFilter : 'messageStatusArray' }}
												</span>
			
											</td>
											<td>
												<span ng-bind="pushList.pushDate"></span>

											</td>
											<td>
												<span ng-bind="pushList.pushUser"></span>

											</td>
											<td>
												<a class="btn" data-target="#" href="javascript:" ng-click="queryPushMessage(pushList.pushId)">查看</a>
												<a  ng-if="pushList.state=='2'" class="btn" data-target="#" href="index.html#/pushDetail/{{pushList.pushId}}">推送</a>
												<a class="btn" href="javascript:" ng-click="deleteMessage(pushList.pushId)">删除</a>
											</td>
										</tr>
									</tbody>
								</table>
								<tm-pagination conf="paginationConf"></tm-pagination>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
<!--新增消息推送-->
<div id="addPushMessage" class="modal fade" role="dialog" aria-hidden="true" data-backdrop="false">
    <div class="modal-dialog">
        <div class="modal-content">
        	<form class="w5c-form demo-form" id="formID" role="form" w5c-form-validate="vm.validateOptions" novalidate name="validateForm">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">新增消息推送</h4>
            </div>
            <div class="modal-body form">
                <div class="form-group">
                    <ul class="ul_one">
						<li>
						    <div>
						    <span><i class="star-color">*</i> 标题：</span>
						        <input type="text" class="form-control validInput" ng-model="add_title" placeholder="请输入推送消息标题" name="add_title" required="" />
						    </div>
						</li>
						<li>
						    <div>
						        <span><i class="star-color">*</i> 内容：</span>
						        <textarea required="" ng-model="add_content" class="form-control validInput" placeholder="请输入推送消息内容" name="add_content" rows="3"></textarea>
						    </div>
						</li>
						<li>
						    <div>
						        <span>消息类型：</span>
						            <select ng-model="add_messageType" class="form-control validInput">
									<option value="1">普通消息推送</option>
									<option value="2">系统更新推送</option>
									<option value="3">活动推送</option>
								</select>
						        </div>
						    </li>
						    <li>
						        <div>
						            <span>推送系统端：</span>
						            <select ng-model="add_sysCode" class="form-control validInput">
									<!--<option value="1">全部</option>-->
									<option value="2">app端</option>
									<!--<option value="3">微信端</option>-->
								</select>
						        </div>
						    </li>
						    <li>
						        <div>
						            <span>消息范围：</span>
						            <select ng-model="add_scope" class="form-control validInput">
										<option value="1">所有用户</option>
										<!--<option value="2">所有在线用户</option>
										<option value="3">注册3个月用户</option>
										<option value="4">其他自定义条件用户</option>-->
									</select>
						        </div>
						        <div class="mt20" ng-show="add_scope=='4'">
						            <p>
						            	<span>注册时间：</span>
						            	<input class="form-control width47 getTime validInput"  type="text" ng-readonly="true"
						            ng-model="add_regStartDate" ng-change="dateIsChange=false"/>~
						            	<input class="form-control width47 getTime validInput"  type="text" ng-readonly="true"
						            ng-model="add_regEndDate" ng-change="dateIsChange=false"/>
						            </p>
						            <p class="mt20">
						            	<span>用户性别：</span>
						            	<input class="validInput" checked=""  type="radio"
						            ng-model="add_accountSex" value="1" />全部 
						            	<input class="validInput"  type="radio"
						            ng-model="add_accountSex" value="2" />男 
						            <input class="validInput"  type="radio"
						            ng-model="add_accountSex" value="3" />女 
						            </p>
						        </div>
						    </li>
						    <li>
						        <div>
						            <span>用户范围：</span>
						            <select ng-model="add_pushOperator" class="form-control validInput">
										<option value="2">所有运营商</option>
										<!--<option value="1">电桩用户</option>
										<option value="3">华体用户</option>-->
									</select>
						        </div>
						    </li>
						    <li>
						        <div>
						            <span>消息状态：</span>
						            <select ng-model="add_state" class="form-control validInput">
										<option value="1">及时推送</option>
										<!--<option value="3">延时推送</option>
										<option value="2">草稿</option>-->
									</select>
						        </div>
						        <div class="mt20" ng-show="add_state=='3'">
						            <span>延时推送时间：</span>
						            <input class="form-control getTime validInput"  type="text" ng-readonly="true"
                    ng-model="add_delayDate" ng-change="dateIsChange=false"/>
						        </div>
						    </li>
						</ul>
    
                </div>
            </div>
            <div class="modal-footer">
                <!--<button w5c-form-submit="previewPushMessage();" type="button" class="btn btn-success"> <i class="fa fa-file-o"></i> 预览
                    </button>-->
                <button w5c-form-submit="submitPushMessage();" type="button" class="btn btn-primary"> <i class="fa fa-check"></i> 保存并推送
                    </button>
                <button type="button" class="btn btn-danger" data-dismiss="modal" onclick="validReset();"> <i class="fa fa-times"></i> 关闭
                    </button>
            </div>
            </form>
        </div>
    </div>
</div>

<!--查看消息详情-->
<div id="queryPushMessage" class="modal fade" role="dialog" aria-hidden="true" data-backdrop="false">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">查看推送消息详情</h4>
            </div>
            <div class="modal-body form">
                <div class="form-group">
                    <ul class="ul_one">
						<li>
						    <div>
						    	<b><span>标题：</span></b>
						    	<span class="span_detail" ng-bind="pushDetail.title"></span>
						    </div>
						</li>
						<li>
						    <div>
						        <b><span>消息编写时间：</span></b>
						        <span class="span_detail" ng-bind="pushDetail.edit_date"></span>
						    </div>
						</li>
						<li>
						    <div>
						        <b><span>内容：</span></b>
						        <span class="span_detail" ng-bind="pushDetail.content"></span>
						    </div>
						</li>
						<li>
						    <div>
						        <b><span>消息类型：</span></b>
						        <span class="span_detail">{{pushDetail.message_type | getValueInStaticFilter : 'messageTypeArray'}}</span>
						    </div>
						</li>
						<li>
						    <div>
						        <b><span>推送系统端：</span></b>
						        <span class="span_detail">{{pushDetail.sys_code | getValueInStaticFilter :'sysCodeStatusArray' }}</span>
						    </div>
						</li>
						<li>
						    <div>
						        <b><span>消息范围：</span></b>
						        <span class="span_detail">{{pushDetail.scope | getValueInStaticFilter : 'scopeStatusArray'}}</span>
							</div>
						</li>
						<li ng-if="pushDetail.scope=='4'">
						    <div>
						        <b><span>注册时间：</span></b>
						        	<span class="span_detail" ng-if="!!pushDetail.reg_start_date">
						        		{{pushDetail.reg_start_date}}~
						        		{{pushDetail.reg_end_date}}
						        	</span>
							</div>
						</li>
						<li ng-if="pushDetail.scope=='4'">
						    <div>
						        <b><span>性别：</span></b>
						        	<span class="span_detail" ng-if="!!pushDetail.account_sex">
						        		{{pushDetail.account_sex | getValueInStaticFilter : 'accountSexArray' }}
						        	</span>
							</div>
						</li>
						<li>
						    <div>
						        <b><span>用户范围：</span></b>
						        <span class="span_detail">{{pushDetail.push_operator | getValueInStaticFilter : 'merchantCodeArray' }}</span>
						    </div>
						</li>
						<li>
						    <div>
						        <b><span>消息状态：</span></b>
						        <span class="span_detail">{{pushDetail.state | getValueInStaticFilter : 'messageStatusArray'}}</span>
						        <a class="btn" href="javascript:;" ng-click="pushMessage(pushDetail.pushId);" ng-if="pushDetail.state=='2'">推送</a>
						    </div>
						</li>
						<li>
						    <div>
						        <b><span>推送时间：</span></b>
						        <span class="span_detail" ng-if="!!pushDetail.push_date" ng-bind="pushDetail.push_date"></span>
						    </div>
						</li>
						<li ng-if="pushDetail.state=='3'">
						    <div>
						        <b><span>延时推送时间：</span></b>
						        <span class="span_detail" ng-if="!!pushDetail.delayDate" ng-bind="pushDetail.delayDate"></span>
						    </div>
						</li>
						<li>
						    <div>
						        <b><span>是否有效：</span></b>
						        <span class="span_detail" ng-if="pushDetail.valid_flag=='1'">有效</span>
						    </div>
						</li>
						<li>
						    <div>
						        <b><span>操作员：</span></b>
						        <span class="span_detail" ng-bind="pushDetail.pushUser"></span>
						    </div>
						</li>
					</ul>
    
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-danger" data-dismiss="modal" onclick="validReset();"> <i class="fa fa-times"></i> 关闭
                    </button>
            </div>
        </div>
    </div>
</div>
<!--预览消息-->
<div id="previewPushMessage" class="modal fade" role="dialog" aria-hidden="true" data-backdrop="false">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">推送消息预览</h4>
            </div>
            <div class="modal-body form">
            	<p ng-bind="previewTitle"></p>
            	<p ng-bind="previewContent"></p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-danger" data-dismiss="modal" onclick="validReset();"> <i class="fa fa-times"></i> 关闭
                    </button>
            </div>
        </div>
    </div>
</div>

<script>
$('.getTime').datetimepicker({
    language: 'zh-CN',
    pickTime: false,
    todayBtn: true,
    autoclose: true,
    minView: '2',
    forceParse: false,
    format: "yyyy-mm-dd hh:ii"
});
</script>
</body>
		<!-- END BODY -->
	</html>